/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gui;

import dao.BaoCaoCongNoDAO;
import dao.KhachHangDAO;
import dao.PhieuThuDAO;
import dao.QuiDinhDAO;
import java.util.Date;
import java.util.List;
import java.util.Vector;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import pojo.BaoCaoCongNo;
import pojo.KhachHang;
import pojo.PhieuThu;
import pojo.QuyDinh;

/**
 *
 * @author LaiHuynh
 */
public class PhieuThuTien extends javax.swing.JInternalFrame {

    private int maCuaHang;

    public int getMaCuaHang() {
        return maCuaHang;
    }

    public void setMaCuaHang(int maCuaHang) {
        this.maCuaHang = maCuaHang;
    }
    private DefaultTableModel dtm;

    /**
     * Creates new form PhieuThuTien
     */
    public PhieuThuTien() {
        initComponents();
    }

    private void hienThiDanhSach() {
        //doc du lieu
        this.dtm = new DefaultTableModel();
        List<PhieuThu> ds = PhieuThuDAO.layDanhSachPhieuThu();
        this.dtm.addColumn("Mã Phiếu Thu");
        this.dtm.addColumn("Ngày Thu");
        this.dtm.addColumn("Khách Hàng");
        this.dtm.addColumn("Số Tiền");
        for (int i = 0; i < ds.size(); i++) {
            PhieuThu pt = ds.get(i);
            Vector vt = new Vector();
            vt.add(pt.getMaPhieuThu());
            vt.add(pt.getNgayThu());
            KhachHang kh = pt.getKhachHang();
            vt.add(kh.getMaKhachHang());
            vt.add(pt.getSoTienThu());
            dtm.addRow(vt);
        }
        this.jtDanhSach.setModel(dtm);
    }

    public void xoaPhieuThu() {
        try {
            int dong = this.jtDanhSach.getSelectedRow();
            int maPhieuThu = (Integer) this.jtDanhSach.getValueAt(dong, 0);
            boolean kq = PhieuThuDAO.xoaPhieuThu(maPhieuThu);
            if (kq == true) {
                JOptionPane.showMessageDialog(this, "Xóa thành công");
            } else {
                JOptionPane.showMessageDialog(this, "Xóa thất bại");
            }
            //Hien thi lai danh hang san xuat
            this.hienThiDanhSach();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
    }

    public void capNhatPhieuThu(PhieuThu pt) {
        try {
            PhieuThuDAO.capNhatThongTinHangsx(pt);
            this.hienThiDanhSach();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel2 = new javax.swing.JPanel();
        jbtThem = new javax.swing.JButton();
        jbtXoa = new javax.swing.JButton();
        jbtCapNhat = new javax.swing.JButton();
        jbtXoaTrang = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jtfMaPhieuThu = new javax.swing.JTextField();
        jtfMaKhachHang = new javax.swing.JTextField();
        jtfSoTien = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jdcNgayThuTien = new com.toedter.calendar.JDateChooser();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtDanhSach = new javax.swing.JTable();
        jbtDong = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setClosable(true);
        setIconifiable(true);
        setMaximizable(true);
        setResizable(true);
        setTitle("Phiếu thu tiền");
        addInternalFrameListener(new javax.swing.event.InternalFrameListener() {
            public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {
                formInternalFrameOpened(evt);
            }
        });

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Các chức năng"));

        jbtThem.setText("Thêm");
        jbtThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtThemActionPerformed(evt);
            }
        });

        jbtXoa.setText("Xóa");
        jbtXoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtXoaActionPerformed(evt);
            }
        });

        jbtCapNhat.setText("Cập nhật");
        jbtCapNhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtCapNhatActionPerformed(evt);
            }
        });

        jbtXoaTrang.setText("Xóa trắng");
        jbtXoaTrang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtXoaTrangActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbtThem, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jbtXoaTrang)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jbtXoa, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jbtCapNhat, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jbtThem)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbtXoa)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jbtCapNhat)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbtXoaTrang)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Nhập thông tin phiếu thu"));

        jLabel2.setText("Mã phiếu thu(Auto):");

        jLabel3.setText("Mã khách hàng:");

        jtfMaPhieuThu.setEnabled(false);

        jtfMaKhachHang.setEnabled(false);

        jLabel5.setText("Ngày thu tiền:");

        jLabel6.setText("Số tiền thu:");

        jButton1.setText(">");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel3)
                    .addComponent(jLabel2)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jtfMaPhieuThu, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jtfMaKhachHang, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton1))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jdcNgayThuTien, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
                        .addComponent(jtfSoTien, javax.swing.GroupLayout.Alignment.LEADING)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jtfMaPhieuThu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtfMaKhachHang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(jButton1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel5)
                    .addComponent(jdcNgayThuTien, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtfSoTien, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Danh sách phiếu thu tiền"));
        jPanel3.setToolTipText("");

        jtDanhSach.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        jtDanhSach.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtDanhSachMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jtDanhSach);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        jbtDong.setText("Đóng");
        jbtDong.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtDongActionPerformed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 20)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(0, 51, 255));
        jLabel1.setText("PHIẾU THU TIỀN");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(159, 159, 159)
                                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jbtDong)
                .addGap(58, 58, 58))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jbtDong)
                .addContainerGap(23, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void formInternalFrameOpened(javax.swing.event.InternalFrameEvent evt) {//GEN-FIRST:event_formInternalFrameOpened
        // TODO add your handling code here:
        this.hienThiDanhSach();
    }//GEN-LAST:event_formInternalFrameOpened

    private void jbtDongActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtDongActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_jbtDongActionPerformed

    private void jtDanhSachMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtDanhSachMouseClicked
        // TODO add your handling code here:
        int dong = jtDanhSach.getSelectedRow();
        int maPhieuThu = (Integer) this.jtDanhSach.getValueAt(dong, 0);
        Date d = (Date) this.jtDanhSach.getValueAt(dong, 1);
        int maKhachHang = (Integer) this.jtDanhSach.getValueAt(dong, 2);
        double soTien = (double) this.jtDanhSach.getValueAt(dong, 3);
        this.jtfMaPhieuThu.setText(String.valueOf(maPhieuThu));
        this.jtfMaKhachHang.setText(String.valueOf(maKhachHang));
        this.jdcNgayThuTien.setDate(d);
        this.jtfSoTien.setText(String.valueOf(soTien));
    }//GEN-LAST:event_jtDanhSachMouseClicked

    private void jbtThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtThemActionPerformed
        // TODO add your handling code here:
        try {
            int maKhachHang = Integer.parseInt(jtfMaKhachHang.getText());
            Date d = jdcNgayThuTien.getDate();
            double soTien = Double.parseDouble(jtfSoTien.getText());
            //QuyDinh qd = QuiDinhDAO.layAllQuyDinh(maCuaHang);
            KhachHang kh = KhachHangDAO.layThongTinKhachHang(maKhachHang);
            double tienNo = kh.getTienNo();
            PhieuThu pt = new PhieuThu();
            pt.setKhachHang(kh);
            pt.setNgayThu(d);
            pt.setSoTienThu(soTien);
            if (tienNo < soTien) {
                JOptionPane.showMessageDialog(this, "Tiền thu đã lớn hơn tiền khách hàng đang nợ");
                return;
            }
            double tienNoMoi = tienNo - soTien;
            kh.setTienNo(tienNoMoi);
            KhachHangDAO.capNhatThongTinKhachHang(kh);
            BaoCaoCongNo cn = new BaoCaoCongNo();
            cn.setKhachHang(kh);
            cn.setNgayPhatSinh(d);
            cn.setNoDau(tienNo);
            cn.setNoCuoi(tienNoMoi);
            cn.setPhatSinh(tienNoMoi - tienNo);
            BaoCaoCongNoDAO.themThongBaoCaoCongNo(cn);
            PhieuThuDAO.themPhieuThu(pt);
            JOptionPane.showMessageDialog(this, "Thêm Thành Công");
            this.hienThiDanhSach();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex);
        }
    }//GEN-LAST:event_jbtThemActionPerformed

    private void jbtXoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtXoaActionPerformed
        // TODO add your handling code here:
        int dong = this.jtDanhSach.getSelectedRow();
        if (dong >= 0) {
            int kq = JOptionPane.showConfirmDialog(this, "Bạn có thật sự muốn xóa?", "Thông báo", JOptionPane.YES_NO_OPTION);
            if (kq == JOptionPane.YES_OPTION) {
                this.xoaPhieuThu();
            }
        }
    }//GEN-LAST:event_jbtXoaActionPerformed

    private void jbtCapNhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtCapNhatActionPerformed
        // TODO add your handling code here:
        try {
            int maPhieuThu = Integer.parseInt(jtfMaPhieuThu.getText());
            int maKhachHang = Integer.parseInt(jtfMaKhachHang.getText());
            Date d = jdcNgayThuTien.getDate();
            double soTien = Double.parseDouble(jtfSoTien.getText());
            KhachHang kh = KhachHangDAO.layThongTinKhachHang(maKhachHang);
            double tienNo = kh.getTienNo();
            PhieuThu pt = new PhieuThu();
            pt.setMaPhieuThu(maPhieuThu);
            pt.setKhachHang(kh);
            pt.setNgayThu(d);
            pt.setSoTienThu(soTien);
            if (tienNo < soTien) {
                JOptionPane.showMessageDialog(this, "Tiền thu đã lớn hơn tiền khách hàng đang nợ");
                return;
            }
            double tienNoMoi = tienNo - soTien;
            kh.setTienNo(tienNoMoi);
            BaoCaoCongNo cn = new BaoCaoCongNo();
            cn.setKhachHang(kh);
            cn.setNgayPhatSinh(d);
            cn.setNoDau(tienNo);
            cn.setNoCuoi(tienNoMoi);
            cn.setPhatSinh(tienNoMoi - tienNo);
            int kq = JOptionPane.showConfirmDialog(this, "Bạn có thật sự muốn cập nhật?", "Thông báo", JOptionPane.YES_NO_OPTION);
            if (kq == JOptionPane.YES_OPTION) {
                this.capNhatPhieuThu(pt);
                KhachHangDAO.capNhatThongTinKhachHang(kh);
                BaoCaoCongNoDAO.themThongBaoCaoCongNo(cn);
            }
            JOptionPane.showMessageDialog(this, "Cập Nhật Thành Công");
            this.hienThiDanhSach();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex);
        }
    }//GEN-LAST:event_jbtCapNhatActionPerformed

    private void jbtXoaTrangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtXoaTrangActionPerformed
        // TODO add your handling code here:
        jtfMaKhachHang.setText("");
        jtfMaPhieuThu.setText("");
        jtfSoTien.setText("");
    }//GEN-LAST:event_jbtXoaTrangActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        TimKiemKhachHang_Dialog dialog = new TimKiemKhachHang_Dialog(null, true);
        dialog.setVisible(true);
        int maKhachHang = dialog.getMaKhachHang();
        this.jtfMaKhachHang.setText(String.valueOf(maKhachHang));
    }//GEN-LAST:event_jButton1ActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JButton jbtCapNhat;
    private javax.swing.JButton jbtDong;
    private javax.swing.JButton jbtThem;
    private javax.swing.JButton jbtXoa;
    private javax.swing.JButton jbtXoaTrang;
    private com.toedter.calendar.JDateChooser jdcNgayThuTien;
    private javax.swing.JTable jtDanhSach;
    private javax.swing.JTextField jtfMaKhachHang;
    private javax.swing.JTextField jtfMaPhieuThu;
    private javax.swing.JTextField jtfSoTien;
    // End of variables declaration//GEN-END:variables
}
